package com.cskaoyan.controller.admin.dashboard;

import com.cskaoyan.bean.common.BaseRespVo;
import com.cskaoyan.bean.vo.admin.dashboard.DashBoardVo;
import com.cskaoyan.service.admin.dashboard.DashBoardService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author MoJunXiang
 * @since 2022/09/06 20:54
 */
@RestController
@RequestMapping("admin")
public class DashBoardController {

    @Autowired
    DashBoardService dashBoardService;


    /**
     * @function_name dashboard
     * @idea 返回 ***所有***  **用户数量** ， **商品数量** ， **货品数量** ， **订单数量**
     * @return com.cskaoyan.bean.common.BaseRespVo<com.cskaoyan.bean.vo.admin.dashboard.DashBoardVo>
     * @author MoJunXiang
     * @since 2022/09/07 23:56
     */
    @RequestMapping("dashboard")
    public BaseRespVo<DashBoardVo> dashboard() {
        BaseRespVo<DashBoardVo> vo = dashBoardService.dashboard();
        return vo;
    }
}
